{include file="common/header"}
	<div class="main-container container-fluid">
		<div class="page-container">
			            {include file="common/menu"}
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                                        <li>
                        <a href="{:url('admin/index')}">系统</a>
                    </li>
                                        <li class="active">栏目管理</li>
                                        </ul>
                </div>
                <!-- /Page Breadcrumb -->
                <!-- Page Body -->
                <div class="page-body">                    
<button type="button" tooltip="添加栏目" class="btn btn-sm btn-azure btn-addon" onClick="javascript:window.location.href = '{:url('add')}'"> <i class="fa fa-plus"></i> Add
</button>
<button type="button" tooltip="删除栏目" class="btn btn-sm btn-azure btn-addon" onClick="javascript:document.myform.submit();"> <i class="fa fa-trash-o"></i> Del
</button>
<div class="row">
    <div class="col-lg-12 col-sm-12 col-xs-12">
        <div class="widget">
            <div class="widget-body">
                <div class="flip-scroll">
                <form class="form-horizontal" role="form" action="{:url('bdel')}" name="myform" id="myform" method="post">
                    <table class="table table-bordered table-hover form-inline" id="selall">
                        <thead class="">
                            <tr>
                            	<th class="text-center">
                            	<label>
		                          <input  type="checkbox" name="checkbox" onclick="checkAll(this)" />
		                          <span class="text"></span>
		                        </label>
								</th>
                                <th class="text-center">ID</th>
                                <th class="text-center">栏目名称</th>
                                <th class="text-center">栏目英文名称</th>
                                <th class="text-center">封面</th>
                                <th class="text-center">栏目类型</th>
                                <th class="text-center">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                        {volist name="list" id="vo"}
                               <tr>
                               <td class="text-center">
                               <label>
		                           <input type="checkbox" name="bdel[]" value="{$vo.cate_id}" />
		                           <span class="text"></span>
		                       </label>
								</td>
                                <td align="center">{$vo.cate_id}</td>
                                <td align="left"><a href="{:url('category/edit',array('id'=>$vo['cate_id']))}"><?php echo str_repeat('-',$vo['level']*8);?>{$vo.cate_name}</a></td>
                                <td align="center"><a href="{:url('category/edit',array('id'=>$vo['cate_id']))}">{$vo.cate_ename}</a></td>
                                <td align="center">
                                {if condition="$vo['cate_pic'] neq ''"}
						        <img src="__IMG__{$vo.cate_pic}" height="50" />
						        {else /}
						        暂无封面
						        {/if}
                                </td>
                                <td align="center">
								{switch $vo.cate_type}
								    {case value="0"}封面{/case}
								    {case value="1"}列表{/case}
								    {case value="2"}产品{/case}
								{/switch}
								</td>
                                <td align="center">
                                    <a href="{:url('category/edit',array('id'=>$vo['cate_id']))}" class="btn btn-primary btn-sm shiny">
                                        <i class="fa fa-edit"></i> 编辑
                                    </a>
                                    <a href="#" onClick="warning('确实要删除吗', '{:url('category/del',array('id'=>$vo['cate_id']))}')" class="btn btn-danger btn-sm shiny">
                                        <i class="fa fa-trash-o"></i> 删除
                                    </a>
                                </td>
                            </tr> 
                        {/volist}
                           </tbody>
                    </table>
                    </form>
                </div>
                <div>
  <?php
    if(isset($_POST['week'])){
        var_dump($_POST['week']);
    }
?>
                </div>
            </div>
        </div>
    </div>
</div>

                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->
		</div>	
	</div>
	<script type="text/javascript">
	function checkAll(obj){
	    $("#selall input[type='checkbox']").prop('checked', $(obj).prop('checked'));
	}
	</script>
{include file="common/footer"}